uniform mat4 u_mvpMatrix;
uniform vec3 campos;
attribute vec3 a_posL;
attribute vec2 a_uv;
varying vec2   v_uv;
varying float e_fog;
void main()
{
//	vec3 campos=vec3(1.0,0.0,1.0);
	vec4 posL=vec4(a_posL, 1.0);
	gl_Position = u_mvpMatrix*posL;
	float fogStart=1.0;
	//float DistoCam=length(posL.xyz-campos.xyz);
	float DistoCam=distance(posL.xyz,campos.xyz);
	e_fog=clamp((DistoCam-fogStart)/10.5,0.0,1.0);
	v_uv = a_uv;
}
   